package net.xdclass.order.component;

import net.xdclass.common.exception.BizException;
import net.xdclass.order.enums.ProductOrderPayTypeEnum;
import net.xdclass.order.model.vo.PayInfoVO;

/**
 * 支付
 */
public interface PayStrategy {

    /**
     * 下单
     */
    String unifiedOrder(PayInfoVO payInfo);

    /**
     * 退款
     */
    default String refund(PayInfoVO payinfo){
        throw new BizException("退款异常");
    };

    /**
     * 查询订单状态
     */
    default String queryPayState(PayInfoVO payInfo){
        throw new BizException("查询订单状态异常");
    }

    ProductOrderPayTypeEnum supportType();

}
